<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ include file="/WEB-INF/views/include/constrant.jsp"%>
<jsp:include page="/WEB-INF/views/layouts/head.jsp"></jsp:include>
<html>
<head>
<title>包车详情</title>
<link href="${ctxStatic }/xiake/css/list.css" rel='stylesheet' type='text/css' />
<link href="${ctxStatic }/xiake/css/style.css" rel='stylesheet' type='text/css' />
<link href="${ctxStatic }/index/css/tourism.css" rel="stylesheet">
<link href="${ctxStatic }/index/css/down.css" rel="stylesheet">
<link href="${ctxStatic }/cityselector/cityselect.css" rel='stylesheet'type='text/css' />
<link href="${ctxStatic }/index/components/font-awesome/css/font-awesome.min.css" rel="stylesheet"> 
<script src="${ctxStatic }/index/js/tourism.js"></script>
<script type="text/javascript" src="${ctxStatic }/cityselector/cityselect.js"></script>
<script type="text/javascript">
$(function() {
	if("${tRentproduct.tabType}".length>0){
		 $('.zb').text("${tRentproduct.tabType}");
		 $('.md').text("${tRentproduct.anothertabType}");
	}
	$('.box').mouseenter(function(){
        $('.md').removeClass('hide');
        $('.bg').attr('src','${ctxStatic }/index/images/up.png')
    });
    $('.box').mouseleave(function(){
        $('.md').addClass('hide');
        $('.bg').attr('src','${ctxStatic }/index/images/xiala.png')
    });
    $('.md').click(function(){
        var sec=$(this).text();
        var sec2=$('.zb').text();
        $('#dayRentType').val(sec);
        $(this).text(sec2);
        $('.zb').text(sec);
        $('.md').addClass('hide');
        $('.bg').attr('src','${ctxStatic }/index/images/xiala.png')
    });
   $(".sitename").click(function(){
	   $("#destination").val($(this).html());
	   $("#travelRentForm").submit();
   })
   $(".day").click(function(){
	   $("#estday").val($(this).html());
	   $("#travelRentForm").submit();
   })
   $("#search").click(function(){
	   $("#estday").val("");
	   $("#destination").val("");
	   $(".sitename").val("");
	   $("#pageNo").val(1);
	   $("#pageSize").val(15);
	   $("#travelRentForm").submit();
   })
	// 初始化站点选择框
	$.post('${ctxFront}/info/site/siteJson',{spottypes:'0,b'}, function(data) {
		var allCity = data;
		new Vcity.CitySelector({input:'departcity_sitename',cityData:allCity});
	});
})
function page(n,s){
	$("#pageNo").val(n);
	$("#pageSize").val(s);
	$("#travelRentForm").submit();
	return false;
}
</script>
</head>
<body><input type="hidden" id="menuInfo" value="indexTravelRent">

<div class="tourism">
    <div class="banner-2">
        <img src="${ctxStatic }/index/images/banner-2.jpg">
    </div>
</div>

<div class="mout">
    <div class="search bar1">
        <form style="text-align: center" id="travelRentForm" action="${ctxFront}/rentproduct/travelList" method="get">
        <input type="hidden" name="rentType" value="${ORDER_TYPE_RENTPRODUCT_TRAVEL }"/>
        <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		 <input id="destination" name="destination" type="hidden" value="${destination }"/> 
		<input id="estday" name="estday" type="hidden" value="${day }"/>
            <div>
                <div class="box">
                    <img src="${ctxStatic }/index/images/xiala.png" class="bg">
                    <div class="zb" >周边游包车</div>
                    <div class="md hide">目的地包车</div>
                </div>
                <input id="dayRentType" type="hidden" name="tabType" value="${tRentproduct.tabType }" />
            </div>
            <input type="text" id="departcity_sitename"  class="display_ib flex_select1" name="departcity.sitename" value="${tRentproduct.departcity.sitename }" placeholder="请输入出发城市" autocomplete="off">
			<input type="hidden" name="departcity.siteid" value="${tRentproduct.departcity.siteid }" id="departcity.siteid">
			<input type="hidden" name="fromdateStr" readonly  value="${tomorrow }"/>
			<input type="hidden" name="time" readonly  value="${time }"/>
            <button  id="search">&nbsp;&nbsp;&nbsp;搜索</button>
       </form>
    </div>

<div class="tour_spot">
			<div class="tour_spot_warp">
			   <div class="tour_p_days clearfix">
			   	    <div class="tour_p_tit">
			   	    	<p>包车天数：</p>
			   	    </div>
			   	    <div class="tour_d_tt unlimited"><a href="javascript:void(0)" class="day">不限</a></div>
			   	    <ul class="tour_d_list">
			   	     <c:forEach items="${dayList }" var="daynum" >
			   	    	 <li class="tour_d_ii">
			   	    	 <c:if test="${daynum==day }">
			   	    	 	<span class="tour_d_tt ly_g"> <a href="javascript:void(0)" class="day ly_g" >${daynum }天</a></span>
			   	    	 </c:if>
			   	    	 <c:if test="${daynum!=day }">
			   	    	 	<span> <a href="javascript:void(0)" class="day" >${daynum }天</a></span>
			   	    	 </c:if>
			   	    	 </li>
			   	    </c:forEach>
			   	    </ul>
			   </div>
			   			<script>
		$(function(){
			    var hif=true;
			$('.tour_p_down').click(function(){
				if(hif){
				$(this).css('background','url(${ctxStatic }/index/images/jian.png)');
								$(this).siblings('.hid_price').slideDown();
				hif=false;
				}else{
				$(this).css('background','url(${ctxStatic }/index/images/jia.png)');
				      $(this).siblings('.hid_price').slideUp();
				hif=true;
				}
			})
		     	hif!=hif;

		})
	</script>
			   <div class="spot_box clearfix">
			   	     <div class="tour_p_tit">
			   	    	<p>游玩景点：</p>
			   	    </div>
			   	     <div class="tour_p_tt unlimited"><a href="javascript:void(0)" class="sitename">不限</a></div>
			   	     <i class="tour_p_down"></i>
			   	    <ul class="tour_p_list">
			   	    <c:forEach items="${allSiteList }" var="sites">
			   	    	 <li class="tour_p_ii">
			   	    	 <c:if test="${sites==destination }">
			   	    	 	<span  >
			   	    	 	 <a href="javascript:void(0)" class="sitename ly_g" >${sites }</a></span>
			   	    	 </c:if>
			   	    	 <c:if test="${sites!=destination }">
			   	    	 	<span > <a href="javascript:void(0)" class="sitename" >${sites }</a></span>
			   	    	 </c:if>
			   	    	 </li>
			   	    </c:forEach>
			   	    </ul>
			   </div>
		    </div>
		</div>
	
    <div class="router">
    <c:forEach items="${page.list }" var="rentgroup">
        <div class="router_0">
<a href="javascript:window.location.href='${ctxFront }/rentproduct/traveldetails?rentgrpid=${rentgroup.rentgrpid}&departcity=${rentgroup.departcity.siteid }&destcity=${rentgroup.destcity.siteid }&linename=${rentgroup.tLine.linename }&linepic=${rentgroup.tLine.linepic }&daysnum='+${rentgroup.daysnum }">
<img src="https://www.xiakeyueche.com${rentgroup.tLine.linepic } " ></a>
            <div class="rightword">
                <p class="router_1">旅游路线:</p>
                <p class="router_2" style="height: 50px">
  					${rentgroup.tLine.linename } 
				</p>
               <%--  <span  style="font-size: 18px">&nbsp;${rentgroup.lowestPrice }起</span> --%>
<input id="fromdateStr" name="fromdateStr" type="hidden"  value="${tRentproduct.fromdateStr }"/>
<div style="display: inline-block"><!-- &fromdateStr='+$('#fromdateStr').val() -->
    <span class="router_3">天数：</span><span>${rentgroup.daysnum }天</span>
<a href="javascript:window.location.href='${ctxFront }/rentproduct/traveldetails?rentgrpid=${rentgroup.rentgrpid}&departcity=${rentgroup.departcity.siteid }&destcity=${rentgroup.destcity.siteid }&linename=${rentgroup.tLine.linename }&linepic=${rentgroup.tLine.linepic }&daysnum='+${rentgroup.daysnum }">
<p class="fixin" style="display: inline-block" >立即预定</p ></a>
</div>
            </div>
            </div>
     </c:forEach>       
    </div>
</div>
</body>
    <c:if test="${empty page.list }">
		<div style="text-align: center;margin:20px;font-size:14px;color:#607D8B;">霞客君太懒，您要的产品还没有上架。您可以试试<a href="${ctxFront }/rentproduct/demands/form" style="color:#4FBDBA;">定制包车</a>哦~</div>
	</c:if>
	<c:if test="${not empty page.list }">
	<div style="text-align: center;">
		<div class="pagination  font_normal_size" >${page.html}</div>
	</div>
	</c:if>
<jsp:include page="/WEB-INF/views/layouts/foot.jsp"></jsp:include>
</html>
